package com.app.activitys;

import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.List;

import com.app.activitys.adapters.AdapterAlbuns;
import com.app.activitys.adapters.AdapterBandas;
import com.app.entidades.Album;
import com.app.entidades.Bandas;
import com.example.applucianokikao.R;

import android.app.Activity;
import android.os.Bundle;
import android.widget.GridView;

public class GaleriaActivity extends Activity{

	private List<Album> listaAlbuns;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_galeria);
		
		Bundle extras = getIntent().getExtras();
		Bundle valor = extras.getBundle("alb");
		listaAlbuns= (List<Album>) valor.getSerializable("albuns");
	
		/*for(Album a : listaAlbuns){
			byte array[];
			try {
				array = a.getDesc().getBytes("UTF-8");
				String novaString = new String(array, "ISO-8859-1");
				System.out.println(novaString);
			} catch (UnsupportedEncodingException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}  
		}*/
		GridView grid  = (GridView) findViewById(R.id.grid_albuns);
		grid.setAdapter(new AdapterAlbuns(this, listaAlbuns));
		
		
	}
}
